<?php

/**
 * Load CSS File
 *
 * Some of the functions use this
 *
 * @access	private
 * @param	array
 * @param	bool
 * @return	string
 */
if (!function_exists('load_css')) {

    function load_css($cssFile="") {
        if (!empty($cssFile)) {
            $CI = & get_instance();
            $base_url = $CI->config->slash_item('base_url');
            $css_folder = $CI->config->slash_item('css_folder');
            $cssPath = $base_url . '' . $css_folder . '' . $cssFile;
            $res = '<link rel="stylesheet" type="text/css"  href="' . $cssPath . '"></style>';
            return $res;
        }
    }

}
/**
 * Load CSS for Javascript library
 *
 * Some of the functions use this
 *
 * @access	private
 * @param	array
 * @param	bool
 * @return	string
 */
if (!function_exists('load_cssjs')) {

    function load_cssjs($jsName, $autoRun = FALSE) {
        if (!empty($jsName)) {
            $CI = & get_instance();
            $base_url = $CI->config->slash_item('base_url');
            $js_folder = $CI->config->slash_item('js_folder');
            $path = $base_url . '' . $js_folder . '' . $jsName;
            $res = '<link rel="stylesheet" type="text/css" href="' . $path . '"></link>';
            return $res;
        }
    }

}

/**
 * Load Javascript File
 *
 * Some of the functions use this
 *
 * @access	private
 * @param	array
 * @param	bool
 * @return	string
 */
if (!function_exists('load_javascript')) {

    function load_javascript($jsName, $autoRun = FALSE) {
        if (!empty($jsName)) {
            $CI = & get_instance();
            $base_url = $CI->config->slash_item('base_url');
            $js_folder = $CI->config->slash_item('js_folder');
            $jspath = $base_url . '' . $js_folder . '' . $jsName;
            $res = '<script language="javascript" src="' . $jspath . '"></script>';
            return $res;
        }
    }

}
/* End of file url_helper.php */
/* Location: ./system/helpers/url_helper.php */